home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / g / gnu_c / gpplib22.zoo / iotests / tiomisc.cc < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-04  |  450 b   |  35 lines

  1. /* Random regression tests etc. */
  2.  
  3. #include <fstream.h>
  4. #include <stdio.h>
  5. #include <strstream.h>
  6.  
  7. #define BUF_SIZE 4096
  8.  
  9. void
  10. test1 ()
  11. {
  12.    fstream f;
  13.    char    buf[BUF_SIZE];
  14.  
  15.    f.setbuf( buf, BUF_SIZE );
  16. }
  17.  
  18. void
  19. test2( )
  20. {
  21.    char string[BUF_SIZE];
  22.    ostrstream s( string, BUF_SIZE );
  23.  
  24.    s << "Bla bla bla " << 55 << ' ' << 3.23 << '\0' << endl;
  25.    cout << "Test2: " << string << endl;
  26. }
  27.  
  28.  
  29. int main( )
  30. {
  31.   test1 ();
  32.   test2 ();
  33.   return 0;
  34. }
  35.